This invention relates to memory circuits and, more particularly, to fully synchronous pipelined random access memory circuits.
Many high performance systems require a memory that operates with a fast system clock. Some designers use synchronous random access memories (xe2x80x9cRAMsxe2x80x9d) to meet this system requirement. For example, some synchronous static RAMs (SRAMs) are available which use registers or latches to temporarily store the address and control. These SRAMs use a xe2x80x9cpipelinexe2x80x9d scheme whereby the address to be accessed is provided during one cycle and, during the next sequential cycle, the data is provided on the data bus. For example, during a read operation, the address from which data is to be read is provided on the nth cycle and the data read from the SRAM is provided on the data bus on the (n+1)th cycle. For write operations, there are SRAMs that provide the address, control and data during the same cycle and there are designs where address and control are provided on the nth cycle and data is provided on the (n+1)th cycle.
The speed of the SRAM is increased because the set-up and hold time for a register or latch is typically much shorter than the time to access the main array of the SRAM (the difference typically being several nanoseconds). The result is to break the operations into shorter cycles. On the (n+1)th cycle, the register or latch provides the stored address to the SRAMs main array along with the data to be written to the stored address, meeting the set-up and hold times for writing to the SRAM""s main array. Because of the reduced set-up and hold time for the address and data on the (n+1)th cycle, the SRAM""s cycle time, as viewed at the pins of the device can be significantly reduced. As a result, the frequency of the system clock can be increased.
One problem with conventional SRAMs is that, typically, trying to intermix reads and writes in a high speed system causes a cycle to be xe2x80x9clostxe2x80x9d when a memory write is immediately followed by a memory read (i.e., bus turnaround). Generally, a cycle is lost on turnaround because the structure of these RAMs requires an extra cycle to make sure that all of the data is written into the memory before a read operation can be performed. For example, if a write operation is followed by a read operation from the same address, a lost cycle is needed so that the xe2x80x9cnewxe2x80x9d data will be written to the specified address before the read operation is performed on the data stored at the same address. In systems where bus turnaround occurs frequently, the lost cycles on bus turnaround can significantly reduce the bandwidth of the system. With conventional synchronous SRAMs, the same problem can exist.
According to the present invention, a fully synchronous pipelined RAM with no lost cycles on bus turnaround is provided (i.e., the RAM is capable of performing a read operation during any clock cycle or a write operation during any clock cycle without limitation).
One embodiment of the present invention, an SRAM, includes a memory, an input circuit and a logic circuit. The input circuit is coupled to receive a memory address and control signals during any cycle referred to as the nth cycle. During a write operation on the nth cycle, the corresponding write data to be written into the SRAM is provided during the next, (n+1)th, cycle. During the nth cycle, the logic circuit causes the previously stored write data to be written from the input circuit into the memory. The new write data associated with the address and control signal received on the nth cycle is received into the input circuit on the (n+1)th cycle. The write data and the address remain in the input circuit during any intervening read operations.
In this embodiment, when performing a read operation, the logic circuit compares the address of the read operation to the address of the most recent write operation. If the addresses match, then the SRAM outputs the data stored in the input circuit; however, if the addresses do not match, the SRAM outputs the data stored in the memory corresponding to the requested read address.
In another embodiment of the present invention, an SRAM includes an input circuit, an output circuit, a logic circuit and a memory. In this embodiment, the input circuit is coupled to receive a memory address and control signals during any cycle referred to as the nth cycle. The output circuit includes a register to store data read from the memory which is read during the (n+1)th cycle. Data will then be provided out of the output circuit on the next, (n+2)th, cycle.
The logic circuit causes the write data to be stored in a first data register in the input circuit two clock cycles after receipt of the write address and control signals. This data will move through the two-stage pipeline in the input circuit during intervening read operations. Thus, write data is written into the memory during the second write operation after the data has been received in the input circuit. These operations and their associated variations will be more fully understood in accordance with the detailed description taken with the drawings.
When performing a read operation, the logic circuit compares the address of the read operation to the addresses of the previous two write operations. If the read address matches one of the write-addresses stored in the input circuit, then the SRAM outputs to the output circuit the data corresponding to the matched address from the input circuit to the output circuit; if the read address matches both of the write-addresses stored in the input circuit, then the SRAM outputs to the output circuit the data corresponding to the most recently written matched address from the input circuit to the output circuit; however, if the addresses do not match, the SRAM outputs to the output circuit the data stored in the memory corresponding to the requested read address.
This invention will be more fully understood in accordance with the following detailed description taken with the drawings.